<!doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="../assets/mui/css/mui.css"/>
    <script src="../assets/css-switch.js"></script>
    <script>
      window.addEventListener('load', function() {
        var s = document.createElement('script');
        s.src = "../assets/mui/js/mui.js";
        document.head.appendChild(s);

        var el = document.getElementsByTagName('select')[0];

        el.onchange = function() {
          console.log('select onchange');
        };

        el.addEventListener('change', function() {
          console.log('select change');
        });
      });
    </script>
  </head>
  <body>
    <div class="mui-container">
      <h2>Forms</h2>
      <div class="mui-panel">
        <form class="mui-form">
          <legend>Title</legend>
          <div class="mui-textfield"><input type="text"></div>
          <button type="submit" class="mui-btn mui-btn--raised">Submit</button>
        </form>
      </div>

      <div class="mui-panel">
        <form class="mui-form">
          <fieldset>
            <legend>Fieldset1</legend>
            <div class="mui-textfield">
              <input type="text">
              <label>Input 1</label>
            </div>
            <div class="mui-textfield">
              <input type="text">
              <label>Input 2</label>
            </div>
            <div class="mui-textfield">
              <textarea></textarea>
              <label>Textarea</label>
            </div>
          </fieldset>
          <fieldset>
            <legend>Fieldset2</legend>
            <div class="mui-textfield">
              <input type="text">
              <label>Input 1</label>
            </div>
            <div class="mui-textfield">
              <input type="text">
              <label>Input 2</label>
            </div>
            <div class="mui-textfield">
              <textarea></textarea>
              <label>Textarea</label>
            </div>
          </fieldset>
          <button type="submit" class="mui-btn mui-btn--raised">Submit</button>
        </form>
      </div>

      <div class="mui-panel">
        <form class="mui-form mui-form--inline">
          <legend>Title</legend>
          <div class="mui-textfield"><input type="text"></div>
          <button type="submit" class="mui-btn mui-btn--raised">Submit</button>
        </form>
      </div>

      <div class="mui-panel">
        <form class="mui-form mui-form--inline">
          <legend>Title</legend>
          <div class="mui-textfield"><input type="text"></div>
          <div class="mui-select">
            <select>
              <option>Option 1</option>
              <option>Option 2</option>
            </select>
          </div>
          <button type="submit" class="mui-btn mui-btn--raised">Submit</button>
        </form>
      </div>

      <div class="mui-panel">
        <form class="mui-form mui-form--inline">
          <fieldset>
            <legend>Fieldset1</legend>
            <div class="mui-textfield"><input type="text"></div>
            <div class="mui-textfield"><input type="text"></div>
          </fieldset>
          <fieldset>
            <legend>Fieldset2</legend>
            <div class="mui-textfield"><input type="text"></div>
            <div class="mui-textfield"><input type="text"></div>
          </fieldset>
          <button type="submit" class="mui-btn mui-btn--raised">Submit</button>
        </form>
      </div>

    </div>
  </body>
</html>
